using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using System;

namespace XKPlatform.Common
{
    public static class HttpContextCore
    {
        public static IServiceProvider ServiceProvider { get; set; }
        public static IConfiguration Configuration { get; set; }
        public static string filePath = "";

        public static IHostingEnvironment Env { get; set; }
        public static HttpContext Current => ((IHttpContextAccessor)ServiceProvider.GetService(typeof(IHttpContextAccessor))).HttpContext;

        public static string ConnectionStrings { get; set; }
        /// <summary>
        /// 超级权限开发者id
        /// </summary>
        public static string developID { get; set; }
        /// <summary>
        ///debug模式下 是否扫描标识特性的方法
        /// </summary>
        public static bool IsScanAttribute { get; set; }

        /// <summary>
        /// 连接服务器名称
        /// </summary>
        public static string MidEdnHead { get; set; }

        /// <summary>
        /// 接入第三方数据存储 数据库连接
        /// </summary>
        public static string ThirdPartyConStr { get; set; }

        /// <summary>
        /// 连接服务器名称
        /// </summary>
        public static string ThirdPartyHead { get; set; }

        public static string SmartForcastConStr { get; set; }

        public static string FieldManagerConStr { get; set; }
        public static string ServiceType = "单体";//---单体
    }
}
